import axios from "@/utils/request";

export function addCourse(params){
    return axios({
        method:"post",
        url:"/course",
        data:params
    })
}

export function deleteCourse(params){
    return axios({
        method:"delete",
        url:"/course",
        data:params
    })
}

export function updateCourse(params){
    return axios({
        method:"put",
        url:"/course",
        data:params
    })
}

export function selectCourse(params){
    return axios({
        method:"get",
        url:"/course",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            search:params.search,
        }
    })
}

export function selectAllCourse(params){
    return axios({
        method:"get",
        url:"/course/selectAll",
        data:params
    })
}

export function queryCourseById(params){
    return axios({
        method: "post",
        url: "/course/queryCourseById",
        data:params
    })
}